<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>分页居中</title>
    <style type="text/css">
        body {
            margin: 0;
        }
        .page {
            width: 100%;
            /* height: 200px; */
            background-color: azure;
            text-align: center;
            font-size: 0px; /* 去除换行空格 */
            padding: 20px
        }
        .page a, .page span {
            border: 1px solid #ddd;
            background-color: #fff;
            display: inline-block; /* 块级元素会占一行，使用行内块级元素*/
            /* width: 30px; */
            height: 30px;
            text-decoration: none;
            line-height: 30px;
            color: #333;
            padding: 0px 10px;
            font-size: 14px;
            margin: 0px 2px;

        }

        .page span {
            background-color: coral;
            color: #fff;
        }
    </style>
</head>
<body>
    <div class="page">
        <a href="">&lt;</a>
        <span>1</span>
        <a href="">2</a>
        <a href="">3</a>
        <a href="">4</a>
        <a href="">5</a>
        <a href="">...</a>
        <a href="">100</a>
        <a href="">&gt;</a>
    </div>
</body>
</html>